package com.aust.openbrowsers;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class SecondActivity extends AppCompatActivity {
    final String TAG="SecondActivity";
    TextView txtMsg;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second);
//        Intent intent =getIntent();
//        String name=intent.getStringExtra("name");
//        String sex=intent.getStringExtra("sex");
        Bundle bundle = this.getIntent().getExtras();
        String name=bundle.getString("name");
        String sex=bundle.getString("sex");
        txtMsg=findViewById(R.id.txtMsg);
        txtMsg.setText(name+" : "+ sex);

        Log.v(TAG,"onCreate");
    }

    @Override
    protected void onStart() {
        super.onStart();

        Log.v(TAG,"onStart");
    }

    @Override
    protected void onResume() {
        super.onResume();
        Log.v(TAG,"onResume");
    }

    @Override
    protected void onPause() {
        super.onPause();
        Log.v(TAG,"onPause");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.v(TAG,"onDestroy");
    }

    @Override
    protected void onRestart() {
        super.onRestart();
        Log.v(TAG,"onRestart");
    }

    @Override
    protected void onStop() {
        super.onStop();
        Log.v(TAG,"onStop");
    }
}